<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> 
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"> 
<link rel="stylesheet" type="text/css" href="css/bootstrap-responsive.css"> 
<link rel="stylesheet" type="text/css" href="css/bootstrap-responsive.min.css"> 
<title>Locadora</title>

<style>
.login
{
--border:1px solid black;

height: 400px;
margin-left: 25%;
margin-top: 5%;
margin-bottom: 10%;
padding-top:10px;
padding-bottom:10px;
padding-right:10px;
padding-left:10px;
width: 500px;
}
</style>

</head>

 <script type="text/javascript">
 
      (function() {
       var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
       po.src = 'https://apis.google.com/js/client:plusone.js';
       var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
     })();
      
     
      
      function signinCallback(authResult) {
    	  if (authResult['access_token']) {
	    	  document.getElementById('signinGoogleButton').setAttribute('style', 'display: none');
	   		  window.location="loginEmpresa?google=true";
    	    
    	  } else if (authResult['error']) {
	    	   //alert("Erro!");
    	  }
    	
    	}
 </script>
    
<body	class="container" onload="handleClientLoad">
<div>

<div class="login">
	
	<form class="form-horizontal" action="loginEmpresa" method="post">
	<div id="div_logo" class="control-group">
		<a title="logo" href="www.localhost.com" class="controls">
			<img alt="LogoLocadora" src="img/icon.png" class="img-circle"> </img>
		</a>
	</div>
	  <div class="control-group">
		<label class="control-label" for="inputEmail">Email</label>
		<div class="controls">
		  <input type="text" id="inputEmailEmpresa" name="inputEmailEmpresa" placeholder="Email">
		</div>
	  </div>
	  <div class="control-group">
		<label class="control-label" for="inputPassword">Senha</label>
		<div class="controls">
		  <input type="password" id="inputPasswordEmpresa" name="inputPasswordEmpresa" placeholder="Password">
		</div>
	  </div>
	  <div class="control-group">
		<div class="controls">
		  <label class="checkbox">
			<input type="checkbox"> Lembre-me
		  </label>
		  
		  <button type="submit" class="btn">Sign in</button>
		</div>
	  </div>
	  <div class="control-group">
		<div class="controls">
		
		 <span id="signinGoogleButton">
				  <span
				    class="g-signin"
				    data-callback="signinCallback"
				    data-clientid="33036696881.apps.googleusercontent.com"
				    data-cookiepolicy="single_host_origin"
				    data-requestvisibleactions="http://schemas.google.com/AddActivity"
				    data-scope="https://www.googleapis.com/auth/plus.login">
				  </span>
			</span>
			<div id="fb-root"></div>			
			 <span id="signinGoogleButton">
			 
			 	<a href='#' onclick='login();' ><img alt="LogoLocadora" src="img/sing_in.png" class="img-circle"> </a>
			</span>
			
		</div>
		
	  </div>
	</form>
	
	</div>
</div>
<script type="text/javascript">
//<![CDATA[
window.fbAsyncInit = function() {
   FB.init({
     appId      : '148387958666265', // App ID
     channelURL : '', // Channel File, not required so leave empty
     status     : true, // check login status
     cookie     : true, // enable cookies to allow the server to access the session
     oauth      : true, // enable OAuth 2.0
     xfbml      : false  // parse XFBML
   });
};
// logs the user in the application and facebook
function login(){
FB.getLoginStatus(function(r){
     if(r.status === 'connected'){
            window.location.href = 'index.html';
     }else{
        FB.login(function(response) {
                if(response.authResponse) {
              //if (response.perms) 
                    window.location.href = 'fbconnect.php';
            } else {
              // user is not logged in
            }
     },{scope:'email'}); // which data to access from user profile
	 
 }
});
}
// Load the SDK Asynchronously
(function() {
   var e = document.createElement('script'); e.async = true;
   e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';                 
   document.getElementById('fb-root').appendChild(e);
}());
//]]>
</script>

</body>
</html>